﻿using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace RecruitStudents.Utility.Model
{

    /// <summary>
    /// 实体类TB_ConsultTitle 。(属性说明自动提取数据库字段的描述信息)
    /// </summary>
    [Serializable]
    public class TB_ConsultTitle : Entity
    {
        public TB_ConsultTitle() : base("TB_ConsultTitle") { _ID = Guid.NewGuid().ToString(); }

        #region Model
        private string _ID;
        private string _ConsultTypeID;
        private string _ConsultTypeName;
        private string _ConsultTitle;
        private string _ConsultContent;
        private int? _ReadCount;
        private string _IsReply;
        private DateTime? _ReplyDate;
        private string _IsTop;
        private string _IsPublic;
        private string _ConsultResorce;
        private string _UsersID;
        private string _UsersNickName;
        private string _UsersIP;
        private string _State;
        private DateTime? _CreateDate;
        private string _TypeID;
        /// <summary>
        /// 主键ID
        /// </summary>
        public string ID
        {
            get { return _ID; }
            set
            {
                this.OnPropertyValueChange(_.ID, _ID, value);
                this._ID = value;
            }
        }
        /// <summary>
        /// 咨询互动内容ID
        /// </summary>
        public string ConsultTypeID
        {
            get { return _ConsultTypeID; }
            set
            {
                this.OnPropertyValueChange(_.ConsultTypeID, _ConsultTypeID, value);
                this._ConsultTypeID = value;
            }
        }
        /// <summary>
        /// 咨询互动内容名称
        /// </summary>
        public string ConsultTypeName
        {
            get { return _ConsultTypeName; }
            set
            {
                this.OnPropertyValueChange(_.ConsultTypeName, _ConsultTypeName, value);
                this._ConsultTypeName = value;
            }
        }
        /// <summary>
        /// 标题
        /// </summary>
        public string ConsultTitle
        {
            get { return _ConsultTitle; }
            set
            {
                this.OnPropertyValueChange(_.ConsultTitle, _ConsultTitle, value);
                this._ConsultTitle = value;
            }
        }
        /// <summary>
        /// 内容
        /// </summary>
        public string ConsultContent
        {
            get { return _ConsultContent; }
            set
            {
                this.OnPropertyValueChange(_.ConsultContent, _ConsultContent, value);
                this._ConsultContent = value;
            }
        }
        /// <summary>
        /// 阅读数
        /// </summary>
        public int? ReadCount
        {
            get { return _ReadCount; }
            set
            {
                this.OnPropertyValueChange(_.ReadCount, _ReadCount, value);
                this._ReadCount = value;
            }
        }
        /// <summary>
        /// 是否回复
        /// </summary>
        public string IsReply
        {
            get { return _IsReply; }
            set
            {
                this.OnPropertyValueChange(_.IsReply, _IsReply, value);
                this._IsReply = value;
            }
        }
        /// <summary>
        /// 回复日期
        /// </summary>
        public DateTime? ReplyDate
        {
            get { return _ReplyDate; }
            set
            {
                this.OnPropertyValueChange(_.ReplyDate, _ReplyDate, value);
                this._ReplyDate = value;
            }
        }
        /// <summary>
        /// 是否置顶
        /// </summary>
        public string IsTop
        {
            get { return _IsTop; }
            set
            {
                this.OnPropertyValueChange(_.IsTop, _IsTop, value);
                this._IsTop = value;
            }
        }
        /// <summary>
        /// 是否公开
        /// </summary>
        public string IsPublic
        {
            get { return _IsPublic; }
            set
            {
                this.OnPropertyValueChange(_.IsPublic, _IsPublic, value);
                this._IsPublic = value;
            }
        }
        /// <summary>
        /// 来源(App,网站)
        /// </summary>
        public string ConsultResorce
        {
            get { return _ConsultResorce; }
            set
            {
                this.OnPropertyValueChange(_.ConsultResorce, _ConsultResorce, value);
                this._ConsultResorce = value;
            }
        }
        /// <summary>
        /// 提问人ID
        /// </summary>
        public string UsersID
        {
            get { return _UsersID; }
            set
            {
                this.OnPropertyValueChange(_.UsersID, _UsersID, value);
                this._UsersID = value;
            }
        }
        /// <summary>
        /// 提问人名称
        /// </summary>
        public string UsersNickName
        {
            get { return _UsersNickName; }
            set
            {
                this.OnPropertyValueChange(_.UsersNickName, _UsersNickName, value);
                this._UsersNickName = value;
            }
        }
        /// <summary>
        /// 提问人IP
        /// </summary>
        public string UsersIP
        {
            get { return _UsersIP; }
            set
            {
                this.OnPropertyValueChange(_.UsersIP, _UsersIP, value);
                this._UsersIP = value;
            }
        }
        /// <summary>
        /// 状态
        /// </summary>
        public string State
        {
            get { return _State; }
            set
            {
                this.OnPropertyValueChange(_.State, _State, value);
                this._State = value;
            }
        }
        /// <summary>
        /// 创建日期
        /// </summary>
        public DateTime? CreateDate
        {
            get { return _CreateDate; }
            set
            {
                this.OnPropertyValueChange(_.CreateDate, _CreateDate, value);
                this._CreateDate = value;
            }
        }
        /// <summary>
        /// 咨询互动类别(1公告2通知3咨询互动)
        /// </summary>
        public string TypeID
        {
            get { return _TypeID; }
            set
            {
                this.OnPropertyValueChange(_.TypeID, _TypeID, value);
                this._TypeID = value;
            }
        }
        #endregion

        #region Method
        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        public override Field[] GetPrimaryKeyFields()
        {
            return new Field[] {
				_.ID};
        }
        /// <summary>
        /// 获取列信息
        /// </summary>
        public override Field[] GetFields()
        {
            return new Field[] {
				_.ID,
				_.ConsultTypeID,
				_.ConsultTypeName,
				_.ConsultTitle,
				_.ConsultContent,
				_.ReadCount,
				_.IsReply,
				_.ReplyDate,
				_.IsTop,
				_.IsPublic,
				_.ConsultResorce,
				_.UsersID,
				_.UsersNickName,
				_.UsersIP,
				_.State,
				_.CreateDate,
				_.TypeID};
        }
        /// <summary>
        /// 获取值信息
        /// </summary>
        public override object[] GetValues()
        {
            return new object[] {
				this._ID,
				this._ConsultTypeID,
				this._ConsultTypeName,
				this._ConsultTitle,
				this._ConsultContent,
				this._ReadCount,
				this._IsReply,
				this._ReplyDate,
				this._IsTop,
				this._IsPublic,
				this._ConsultResorce,
				this._UsersID,
				this._UsersNickName,
				this._UsersIP,
				this._State,
				this._CreateDate,
				this._TypeID};
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(IDataReader reader)
        {
            this._ID = DataUtils.ConvertValue<string>(reader["ID"]);
            this._ConsultTypeID = DataUtils.ConvertValue<string>(reader["ConsultTypeID"]);
            this._ConsultTypeName = DataUtils.ConvertValue<string>(reader["ConsultTypeName"]);
            this._ConsultTitle = DataUtils.ConvertValue<string>(reader["ConsultTitle"]);
            this._ConsultContent = DataUtils.ConvertValue<string>(reader["ConsultContent"]);
            this._ReadCount = DataUtils.ConvertValue<int?>(reader["ReadCount"]);
            this._IsReply = DataUtils.ConvertValue<string>(reader["IsReply"]);
            this._ReplyDate = DataUtils.ConvertValue<DateTime?>(reader["ReplyDate"]);
            this._IsTop = DataUtils.ConvertValue<string>(reader["IsTop"]);
            this._IsPublic = DataUtils.ConvertValue<string>(reader["IsPublic"]);
            this._ConsultResorce = DataUtils.ConvertValue<string>(reader["ConsultResorce"]);
            this._UsersID = DataUtils.ConvertValue<string>(reader["UsersID"]);
            this._UsersNickName = DataUtils.ConvertValue<string>(reader["UsersNickName"]);
            this._UsersIP = DataUtils.ConvertValue<string>(reader["UsersIP"]);
            this._State = DataUtils.ConvertValue<string>(reader["State"]);
            this._CreateDate = DataUtils.ConvertValue<DateTime?>(reader["CreateDate"]);
            this._TypeID = DataUtils.ConvertValue<string>(reader["TypeID"]);
        }
        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        public override void SetPropertyValues(DataRow row)
        {
            this._ID = DataUtils.ConvertValue<string>(row["ID"]);
            this._ConsultTypeID = DataUtils.ConvertValue<string>(row["ConsultTypeID"]);
            this._ConsultTypeName = DataUtils.ConvertValue<string>(row["ConsultTypeName"]);
            this._ConsultTitle = DataUtils.ConvertValue<string>(row["ConsultTitle"]);
            this._ConsultContent = DataUtils.ConvertValue<string>(row["ConsultContent"]);
            this._ReadCount = DataUtils.ConvertValue<int?>(row["ReadCount"]);
            this._IsReply = DataUtils.ConvertValue<string>(row["IsReply"]);
            this._ReplyDate = DataUtils.ConvertValue<DateTime?>(row["ReplyDate"]);
            this._IsTop = DataUtils.ConvertValue<string>(row["IsTop"]);
            this._IsPublic = DataUtils.ConvertValue<string>(row["IsPublic"]);
            this._ConsultResorce = DataUtils.ConvertValue<string>(row["ConsultResorce"]);
            this._UsersID = DataUtils.ConvertValue<string>(row["UsersID"]);
            this._UsersNickName = DataUtils.ConvertValue<string>(row["UsersNickName"]);
            this._UsersIP = DataUtils.ConvertValue<string>(row["UsersIP"]);
            this._State = DataUtils.ConvertValue<string>(row["State"]);
            this._CreateDate = DataUtils.ConvertValue<DateTime?>(row["CreateDate"]);
            this._TypeID = DataUtils.ConvertValue<string>(row["TypeID"]);
        }
        #endregion

        #region _Field
        /// <summary>
        /// 字段信息
        /// </summary>
        public class _
        {
            /// <summary>
            /// * 
            /// </summary>
            public readonly static Field All = new Field("*", "TB_ConsultTitle");
            /// <summary>
            /// 主键ID
            /// </summary>
            public readonly static Field ID = new Field("ID", "TB_ConsultTitle", "主键ID");
            /// <summary>
            /// 咨询互动内容ID
            /// </summary>
            public readonly static Field ConsultTypeID = new Field("ConsultTypeID", "TB_ConsultTitle", "咨询互动内容ID");
            /// <summary>
            /// 咨询互动内容名称
            /// </summary>
            public readonly static Field ConsultTypeName = new Field("ConsultTypeName", "TB_ConsultTitle", "咨询互动内容名称");
            /// <summary>
            /// 标题
            /// </summary>
            public readonly static Field ConsultTitle = new Field("ConsultTitle", "TB_ConsultTitle", "标题");
            /// <summary>
            /// 内容
            /// </summary>
            public readonly static Field ConsultContent = new Field("ConsultContent", "TB_ConsultTitle", "内容");
            /// <summary>
            /// 阅读数
            /// </summary>
            public readonly static Field ReadCount = new Field("ReadCount", "TB_ConsultTitle", "阅读数");
            /// <summary>
            /// 是否回复
            /// </summary>
            public readonly static Field IsReply = new Field("IsReply", "TB_ConsultTitle", "是否回复");
            /// <summary>
            /// 回复日期
            /// </summary>
            public readonly static Field ReplyDate = new Field("ReplyDate", "TB_ConsultTitle", "回复日期");
            /// <summary>
            /// 是否置顶
            /// </summary>
            public readonly static Field IsTop = new Field("IsTop", "TB_ConsultTitle", "是否置顶");
            /// <summary>
            /// 是否公开
            /// </summary>
            public readonly static Field IsPublic = new Field("IsPublic", "TB_ConsultTitle", "是否公开");
            /// <summary>
            /// 来源(App,网站)
            /// </summary>
            public readonly static Field ConsultResorce = new Field("ConsultResorce", "TB_ConsultTitle", "来源(App,网站)");
            /// <summary>
            /// 提问人ID
            /// </summary>
            public readonly static Field UsersID = new Field("UsersID", "TB_ConsultTitle", "提问人ID");
            /// <summary>
            /// 提问人名称
            /// </summary>
            public readonly static Field UsersNickName = new Field("UsersNickName", "TB_ConsultTitle", "提问人名称");
            /// <summary>
            /// 提问人IP
            /// </summary>
            public readonly static Field UsersIP = new Field("UsersIP", "TB_ConsultTitle", "提问人IP");
            /// <summary>
            /// 状态
            /// </summary>
            public readonly static Field State = new Field("State", "TB_ConsultTitle", "状态");
            /// <summary>
            /// 创建日期
            /// </summary>
            public readonly static Field CreateDate = new Field("CreateDate", "TB_ConsultTitle", "创建日期");
            /// <summary>
            /// 咨询互动类别(1公告2通知3咨询互动)
            /// </summary>
            public readonly static Field TypeID = new Field("TypeID", "TB_ConsultTitle", "咨询互动类别(1公告2通知3咨询互动)");
        }
        #endregion


    }
}

